package aop.spring_aop_aspect.spring;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;

/**
 * Created by IntelliJ IDEA.
 * User: anzhen
 * Date: 14-8-6
 * Time: 下午12:39
 * To change this template use File | Settings | File Templates.
 */


public class Juggler implements Performer/*,InitializingBean,DisposableBean ,ApplicationContextAware*/{

    private ApplicationContext applicationContext;

    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.applicationContext = applicationContext;
    }

    private Magician magician;

    private int beanBags = 3;

    public Juggler(){}

    public Juggler(int beanBags) {
        this.beanBags = beanBags;
    }

    public void perform(int i) {

        System.out.println("beanBags:"+beanBags);

    }

    public void destroy() throws Exception {
        System.out.println("destroy()");
    }

    public void end(){

        System.out.println("end");

    }
    public void init(){

        System.out.println("init");

    }
    public void afterPropertiesSet()  {
        System.out.println("afterPropertiesSet()");

    }

    public void setMagician(Magician magician) {
        this.magician = magician;
    }
}
